package com.cn.design.factory.simple;

/**
 * @author xuhui
 * @Description:
 * @date 2022-06-29 18:33
 **/
public class PhoneFactory {
    //简单工厂
    public static Phone makePhone(String phoneType) {
        if (phoneType.equalsIgnoreCase("MiPhone")) {
            return new MiPhone();
        } else if (phoneType.equalsIgnoreCase("iPhone")) {
            return new IPhone();
        }
        return null;
    }
}
